const Tag = require("../models/Tag");
const Blog = require("../models/Blog")
const BlogTag = require("../models/BlogTag")


// 
exports.getBlogTag = async function () {
    const result = await BlogTag.findAll({
        include: [Tag]
    })
    return result
}


// 增加标签
exports.addTag = async function (blogObj) {
    const ins = await Blog.create(blogObj);
    return ins.toJSON();
}